package Models;

import java.util.Date;

/**
 * @author Morten
 */
public class Order
{
	private static int nextId = 100;
	private int id;
	private Date orderDate, expectedDate;
	private Supplier supplier;
	private boolean delivered, activated = true;

	public Order(Date orderDate, Date expectedDate, Supplier supplier, boolean delivered)
	{
		this.edit(orderDate, expectedDate, supplier, delivered);
		this.id = Order.nextId;
		Order.nextId++;
	}

	public void edit(Date orderDate, Date expectedDate, Supplier supplier, boolean delivered)
	{
		this.setOrderDate(orderDate);
		this.setExpectedDate(expectedDate);
		this.setSupplier(supplier);
		this.setDelivered(delivered);
	}

	public Date getExpectedDate()
	{
		return expectedDate;
	}

	public int getId()
	{
		return id;
	}

	public Date getOrderDate()
	{
		return orderDate;
	}

	public Supplier getSupplier()
	{
		return supplier;
	}

	public boolean isActivated()
	{
		return activated;
	}

	public boolean isDelivered()
	{
		return delivered;
	}

	public void setActivated(boolean activated)
	{
		this.activated = activated;
	}

	public void setDelivered(boolean delivered)
	{
		this.delivered = delivered;
	}

	public void setExpectedDate(Date expectedDate)
	{
		this.expectedDate = expectedDate;
	}

	public void setOrderDate(Date orderDate)
	{
		this.orderDate = orderDate;
	}

	public void setSupplier(Supplier supplier)
	{
		this.supplier = supplier;
	}
}
